<?php
class admin_index{
    private $template;
    private $util;
    private $admin_controler;
    
    
    public function __construct(){
        require_once(PATH_CODE. '/util.class.php');  
       // require_once(MUSIC_ADMIN_MODULE.'/admin.controler.php'); 
        $this->util = new util();
       
    } 
    public function autorun(){
         //load module
        $mid = isset($_GET['module'])?$_GET['module']:'user';
        switch($mid){
           case 'about':  
           case 'artist':
           case 'event':
           case 'art':  
           case 'contact':
           case 'guestbook':
           case 'news':  
           case 'order':
           case 'floor':  
           case 'user':
           break;
           default:
                $mid = 'user';
                break;
           }  
        require_once("module\\{$mid}.php"); 
        $module = 'admin_module_'.$mid;
        $module_obj = new $module;
        $module_obj->autorun();
    }  
}
?>
